package com.fangwaii.core.executor.result;

/**
 * @author lxc18
 * @date 2024/12/5 15:12
 * @description Gatewayresult
 */
public class ExecutorResult {
    private int code;
    private String message;

    //Json？还是泛型？还是String?是Object
    private Object data;

    public ExecutorResult(int code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public static ExecutorResult excutorSucess(Object data){
        return new ExecutorResult(200,"执行成功",data);
    }
    public static ExecutorResult excutorFail(Object data){
        return new ExecutorResult(400,"执行失败",data);
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public Object getData() {
        return data;
    }
}
